/**
 @Name：layuiAdmin 开标项目列表
 @Author：star1029 
 @License：LPPL    
 */
function skip(code){
  var url= "../views/zjmang/zjprojectnofinshfile.html";
  layer.open({
    type: 2
    ,title: "文件下载"
    ,content: '../zjmang/zjprojectnofinshfile.html'
    ,area: ['800px', '600px']
    ,resize: false    
  }
  
  );
  //window.parent.layui.index.openTabsPage(url,"项目标段评标信息")
}

layui.define(['table', 'form'], function(exports){
  var $ = layui.$
  ,table = layui.table
  ,form = layui.form;

  //帖子管理
  table.render({
    elem: '#LAY-app-zjprojectnofinshlist-list'
    ,url: layui.setter.base + 'json/zjprojectnofinshlist/list.js' //模拟接口
    ,cols: [[
      {type: 'checkbox', fixed: 'left'}
      ,{field: 'id', width: 100, title: 'ID', sort: true}
      ,{field: 'BidTitle', title: '标段名称', sort: true,}
       ,{field: 'BidCount', width: 100, title: '投标文件数',
       templet: '<div><a class="iconfont icon-chakanbaogao" style="margin-left: 3%; color: #2196F3;border-radius: 5px; cursor: pointer;text-decoration: underline;" target="_blank" onclick="skip({{d.id}})">{{d.BidCount}}</a></div>'
        }
        ,{title: '初步评审表',  width: 120,align: 'center', fixed: 'right', toolbar: '#table-zjprojectnofinshlist-listcb'}
        ,{title: '详细评审表',  width: 120,align: 'center', fixed: 'right', toolbar: '#table-zjprojectnofinshlist-listdt'}
      ,{field: 'XMMC', title: '项目名称', sort: true  }    
    ]]
    ,page: true
    ,limit: 10
    ,limits: [10, 15, 20, 25, 30]
    ,text: '对不起，加载出现异常！'
  });
  
  //监听工具条
  table.on('tool(LAY-app-zjprojectnofinshlist-list)', function(obj){
    var data = obj.data;
    if(obj.event === 'cbbid'){
      var tr = $(obj.tr);
      var url= "../views/zjmang/zjprojectnofinshdetailcb.html";
      window.parent.layui.index.openTabsPage(url,"初步评审表")
    }else if(obj.event === 'debid'){
      var tr = $(obj.tr);
      var url= "../views/zjmang/zjprojectnofinshdetaildt.html";
      window.parent.layui.index.openTabsPage(url,"详细评审表")
    }
  });
  
  exports('zjprojectnofinshlist', {})
});